import { Upload, UploadProps } from 'antd';
import useUploadProps from './useUploadProps';
import { Dragger } from './Dragger';
import UploadForm from './Form';
import Import from './Import';
interface FileUploadProps extends UploadProps {
  dataType?: 'string' | 'fileNameInValue' | 'array'
  onResponse?:Function
}
const FileUpload = ({ children, ...rest }: FileUploadProps) => {
  const uploadProps = useUploadProps(rest)
  return (<Upload  {...uploadProps} >
    {/* {fileList.length < maxCount ? children : null} */}
    {children}
  </Upload>)
}
FileUpload.Dragger = Dragger
FileUpload.Form = UploadForm
FileUpload.Import = Import
export default FileUpload